package com.service.impl;

import com.dao.UserDao;
import com.domain.User;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userService")
public class UserServiceImp implements UserService {

    @Autowired
    private UserDao userDao;


    @Override
    public boolean findUserById(User user) {
        User user1=userDao.findUserById(user);
        if (user1!=null){
            return true;
        }else {
            return false;
        }
    }

    @Override
    public User findUserInfo(User user) {
        return userDao.findUserInfo(user);
    }


    @Override
    public boolean userRegister(User user) {
        Integer r=userDao.userRegist(user);
        if (r!=0){
            return true;
        }else {
            return false;
        }
    }

    @Override
    public User userLogin(User user) {
        return userDao.userLogin(user);
    }


}

